﻿using SqlSugar;

namespace EPlantApp.Entity.EntityMap
{
    [SplitTable(SplitType.Month)]
    [SugarTable("SystemLog_{year}{month}{day}")]
    public partial class SystemLog
    {
        /// <summary>
        /// 主键ID
        /// </summary>
        [SugarColumn(IsPrimaryKey = true)]
        public int Id { get; set; }

        [SplitField] //分表字段 在插入的时候会根据这个字段插入哪个表，在更新删除的时候用这个字段找出相关表
        [SugarColumn(ColumnName = "Date", IsNullable = false)]
        public DateTime Date { get; set; } = DateTime.Now;

        [SugarColumn(ColumnName = "Thread", IsNullable = true)]
        public string Thread { get; set; }

        [SugarColumn(ColumnName = "Level", IsNullable = true)]
        public string Level { get; set; }

        [SugarColumn(ColumnName = "Logger", IsNullable = true)]
        public string Logger { get; set; }

        [SugarColumn(ColumnName = "Message", IsNullable = true)]
        public string Message { get; set; }

        [SugarColumn(ColumnName = "Exception", IsNullable = true)]
        public string Exception { get; set; }
    }
}
